<template>
  <div>
    <dv-scroll-board :config="config" style="width:100%;height:275px" rowNum="10" />
  </div>
</template>

<script>
export default {
  name: 'RightTable-2',
  data() {
    return {
      config: {
        rowNum: 8,
        header: ['省', 'CPI', '排名'],
        data: [
          ['北京', 109.93],
          ['天津', 107.84],
          ['河北', 104.97],
          ['山西', 105.35],
          ['内蒙古', 106.17],
          ['辽宁', 108.7],
          ['吉林', 104.93],
          ['黑龙江', 105.74],
          ['上海', 105.15],
          ['江苏', 109.19],
          ['浙江', 107.23],
          ['安徽', 108.49],
          ['福建', 108.08],
          ['江西', 109.22],
          ['山东', 109.56],
          ['河南', 109.91],
          ['湖北', 108.1],
          ['湖南', 105.81],
          ['广东', 106.18],
          ['广西', 108.93],
          ['海南', 105.42],
          ['重庆', 108.58],
          ['四川', 108.15],
          ['贵州', 107.77],
          ['云南', 107.77],
          ['西藏', 108.76],
          ['陕西', 107.77],
          ['甘肃', 107.77],
          ['青海', 107.65],
          ['宁夏', 109.19],
          ['新疆', 108.76]
        ]
      }
    }
  },
  mounted() {
    let a = this.config.data.sort((a, b) => {
      return b[1] - a[1]
    })
    a.map((item, index) => {
      a[index].push(index + 1)
    })
    this.$set(this.config, 'data', a)
  }
}
</script>
<style scoped lang="scss"></style>
